//
//  TuiJianPushVCCell.m
//  TTMusic
//
//  Created by 马金晖 on 16/4/5.
//  Copyright © 2016年 cpy. All rights reserved.
//

#import "TuiJianPushVCCell.h"

#define WIDTH self.bounds.size.width
#define HEIGHT self.bounds.size.height

@implementation TuiJianPushVCCell


- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier

{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.titleLabel = [[TTMusicBaseLabel alloc]initWithFrame:CGRectZero];
        
        [self.contentView addSubview:self.titleLabel];
        
        self.singerNMLabel = [[TTMusicBaseLabel alloc]initWithFrame:CGRectZero];
        
        self.singerNMLabel.textColor = [UIColor grayColor];
        
        [self.contentView addSubview:self.singerNMLabel];
        
        self.ZanLabel = [[TTMusicBaseLabel alloc]initWithFrame:CGRectZero];
        
        [self.contentView addSubview:self.ZanLabel];
        
        self.NumLabel = [[TTMusicBaseLabel alloc]initWithFrame:CGRectZero];
        
        [self.contentView addSubview:self.NumLabel];
       
        self.imageViewXIn = [[UIImageView alloc]initWithFrame:CGRectZero];
        
        [self.contentView addSubview:self.imageViewXIn];
        
        self.imageViewSQ = [[UIImageView alloc]initWithFrame:CGRectZero];
        
        [self.contentView addSubview:self.imageViewSQ];
        
               
        
    }
    return self;
}

-(void)layoutSubviews {
    
    [super layoutSubviews];
    
    self.titleLabel.frame = CGRectMake(WIDTH * 0.1,self.bounds.size.height * 0.1 , WIDTH * 0.6, HEIGHT * 0.4);
    self.singerNMLabel.frame = CGRectMake(WIDTH * 0.1, HEIGHT * 0.6, WIDTH * 0.2, HEIGHT * 0.2);
    self.ZanLabel.frame = CGRectMake(WIDTH * 0.35, HEIGHT * 0.6, WIDTH * 0.1, HEIGHT * 0.2);
    self.NumLabel.frame = CGRectMake(WIDTH * 0.05, 0, WIDTH * 0.05, HEIGHT);
    self.imageViewXIn.frame =CGRectMake(WIDTH * 0.3, HEIGHT * 0.6, HEIGHT * 0.2, HEIGHT * 0.2);
    
    self.imageViewSQ.frame = CGRectMake(WIDTH * 0.7, HEIGHT * 0.1, WIDTH * 0.07, WIDTH * 0.07);
    
    
    
}
-(void)setSongsListModel:(SongsListModel *)songsListModel {
    
    _songsListModel = songsListModel;
    
    self.titleLabel.text = songsListModel.name;
    
    self.singerNMLabel.text = songsListModel.singerName;
    
    self.ZanLabel.text = [NSString stringWithFormat:@"%ld", songsListModel.favorites];
    
    self.imageViewXIn.image = [UIImage imageNamed:@"xiaoxin.png"];
    
    self.imageViewSQ.image = [UIImage imageNamed:@"SQ.png"];
    
    
}



@end
